package org.egedede.osgi.guishell.actions;

import java.awt.event.ActionEvent;

import javax.swing.AbstractAction;
import javax.swing.SwingUtilities;

public abstract class BackgroundAction extends AbstractAction {

	public BackgroundAction(String string) {
		super(string);
	}

	public final void actionPerformed(ActionEvent e) {
		final ActionEvent backgroundEvent = e;
		SwingUtilities.invokeLater(new Runnable(){

			public void run() {
				doAction(backgroundEvent);
			}

		});

	}

	public abstract void doAction(ActionEvent e);

}
